Skip to content

Add field selection to ros2 topic delay - #1272

Open
sylvesterkaczmarek wants to merge 1 commit into
ros2:rollingfrom
sylvesterkaczmarek:fix-738-topic-delay-field
Open

sylvesterkaczmarek wants to merge 1 commit into
ros2:rollingfrom
sylvesterkaczmarek:fix-738-topic-delay-field

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Addresses #738.

Add an optional --field selector to ros2 topic delay so the timestamp header can come from a nested sub-message instead of requiring the topic's root message to have a header.

The selector follows the existing field syntax:

  • . selects nested fields
  • .[index] selects array elements

Example for TF:

ros2 topic delay /tf --field transforms.[0]

This keeps the implementation generic and does not special-case TF message types.

Testing

Added focused tests for:

  • root-message behavior when --field is omitted
  • nested array field selection
  • invalid field handling

Did you use Generative AI?

Yes. AI was used to assist with implementation and tests. I reviewed and validated the changes.

@mergify

mergify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@sylvesterkaczmarek
sylvesterkaczmarek force-pushed the fix-738-topic-delay-field branch from ceec4b6 to cae0222 Compare October 1, 2026 00:36
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Rebased onto current rolling today and the branch is now 0 behind and mergeable, with no current failing checks. The topic-delay field selection change remains intact. Could a maintainer review the refreshed head when convenient?

Allow ros2 topic delay to read the timestamp header from a selected sub-message, including indexed array fields such as transforms.[0].

Add focused tests for root, nested-array, and invalid field selection.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@sylvesterkaczmarek
sylvesterkaczmarek force-pushed the fix-738-topic-delay-field branch from cae0222 to fbf1216 Compare October 6, 2026 12:12
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

retest this please

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Build 36 failed only in the existing ros2doctor service-count report test. The topic-delay tests passed, and this PR does not change ros2doctor. Retesting the same head.

retest this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant